#include <stdlib.h>
#include <g729a.h>
#include <inttypes.h>
#include <stdio.h>

static int16_t test_pattern[]={
0x6b21, 0x0050,
0x81, 0x7f, 
0x81, 0x7f,
0x81, 0x7f, 
0x7f, 0x7f,
0x81, 0x81,

0x7f, 0x7f,
0x81, 0x7f,
0x7f, 0x7f,
0x81, 0x7f,
0x7f, 0x7f,
0x81, 0x7f,

0x81, 0x81,
0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,

0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,
0x81, 0x81,
0x81, 0x81,
0x81, 0x7f,

0x81, 0x7f,
0x81, 0x81,
0x7f, 0x81,
0x81, 0x7f,
0x81, 0x7f,
0x7f, 0x81,

0x7f, 0x81,
0x81, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,
0x7f, 0x7f,

0x7f, 0x81,
0x81, 0x7f,
0x81, 0x7f,
0x81, 0x81,
0x7f, 0x7f,
};


int main(void)
{
    void* ctx;
    short* buf;

    buf=calloc(1, 300);

    ctx=g729a_decoder_init();
    g729a_decode_frame(ctx, test_pattern, 0, buf, 0);
    g729a_decoder_uninit(ctx);
    free(buf);
    return 0;
}
